<include file="Admin:header" />

<table  class="search_table print_hide" width="100%">
	<tr>
		<td class="search">
			<form action="{:U($module_name.'/index')}" method="get" name="index_from" id="index_from">
			<input type="hidden" name="g" id="g" value="{$Think.GROUP_NAME}" />
			<input type="hidden" name="m" id="m" value="{$Think.MODULE_NAME}" />
			<input type="hidden" name="a" id="a" value="{$Think.ACTION_NAME}" />

			<input id="title" type="text" class="input-text" name="keyword" value="{$Think.get.keyword}" />
			<select name="searchtype">
			<option value="title" <eq name="searchtype" value='title'>selected="selected"</eq>>经手人</option>
			<option value="bigclass" <eq name="searchtype" value='bigclass'>selected="selected"</eq>>大类</option>
			<option value="smallclass" <eq name="searchtype" value='smallclass'>selected="selected"</eq>>小类</option>
			<option value="bank" <eq name="searchtype" value='bank'>selected="selected"</eq>>银行</option>
			<option value="type" <eq name="searchtype" value='type'>selected="selected"</eq>>类型</option>
			<option value="id" <eq name="searchtype" value='id'>selected="selected"</eq>>ID</option>
			</select>

			<select name="sort">
				<option value="asc" <if condition="$sort =='asc'">selected="selected"</if>>{:L('order_by_asc')}</option>
				<option value="desc" <if condition="$sort =='desc'">selected="selected"</if>>{:L('order_by_desc')}</option>
			</select>

			<select name="listRows">
				<option value="15" <if condition="$listRows ==5">selected="selected"</if>>15{:L('listRows')}</option>
				<option value="20" <if condition="$listRows ==20">selected="selected"</if>>20{:L('listRows')}</option>
				<option value="50" <if condition="$listRows ==50">selected="selected"</if>>50{:L('listRows')}</option>
				<option value="100" <if condition="$listRows ==100">selected="selected"</if>>100{:L('listRows')}</option>
			</select>

			<input type="hidden" id="menuid" name="menuid" value="{$_GET['menuid']}"/>
			<input type="submit" value="{:L('chaxun')}"  class="button" />
			<input type="reset" value="{:L('reset')}" class="button"  />
			<input type="button" value="导入" class="button tophide" onclick="mo_import();" />
			<input type="button" value="导出" class="button tophide" onclick="mo_export()" />
			<input type="button" value="打印" class="button" onclick="mo_print()" />
			</form>
		</td>

	</tr>
</table>

<form name="myform" id="myform" action="" method="post">

<div class="table-list">
    <table width="100%" cellspacing="0" id="print_content">
		<thead>
            <tr>
			<th width="30" class="print_hide tophide"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
            <th width="40">ID</th>
			<th width="120">经手人</th>
			<th width="120">大类</th>
			<th width="120">小类</th>
			<th width="120">银行</th>
			<th width="120">金额</th>
			<th width="120">类型</th>
            <th width="120" class="print_hide tophide">{:L('createtime')}</th>
			<th width="72" class="print_hide tophide">{:L('manage')}</th>
            </tr>
        </thead>
      	<tbody>
      		<volist name="list" id="vo" key="k">
      		<tr>
			<td align="center" class="print_hide tophide"><input class="inputcheckbox " name="ids[]" value="{$vo['id']}" type="checkbox" ></td>
			<td align="center">{$vo['id']}</td>
      		<td align="center">{$vo['title']} </td>
      		<td align="center">{$vo['bigclass']} </td>
      		<td align="center">{$vo['smallclass']} </td>
      		<td align="center">{$vo['bank']} </td>
      		<td align="center">{$vo['amount']} </td>
      		<td align="center">{$vo['type']} </td>
      		<td align="center" class="print_hide tophide"><a class="dateformat" title="{$vo['createtime']|todate='Y-m-d H:i:s'}">{$vo['createtime']|todate="Y-m-d"}</a></td>
			<td align="center" class="print_hide tophide"><a href="{:U($module_name.'/edit',array(id=>$vo['id']))}">{:L('edit')}</a> | <a href="javascript:confirm_delete('{:U($module_name.'/delete',array(id=>$vo['id']))}')">{:L('delete')}</a></td>
      		</tr>
      		</volist>
      	</tbody>
    </table>

    <div class="btn print_hide tophide"><input type="button" class="button" name="dosubmit" value="<?php echo L('delete')?>" onclick="myform.action='{:U($module_name.'/deleteall')}';return confirm_deleteall()"/></div>

</form></div>

<div id="pages" class="page print_hide">{$page}</div>
<script>
$("#catid").attr("value",'{$catid}');
function confirm_deleteall(){
	art.dialog.confirm("{:L('real_delete')}", function(){ $('#myform').submit();});
}
function mo_import(){
url='?g=Admin&m=Attachment&a=showloadpage&file_limit=50&file_types=xls&file_size=500&moduleid=3&mo_import=1&mo_model=accounting';
		art.dialog.open(url, {
		title: '导入文件',
		lock: 'true',
		window: 'top',
		width: 600,
		height: 455,
		});
}
function mo_export(){
	$('#print_content').val('export');
	$('#a').val('export');
	$('#index_from')[0].submit();
}
function mo_print(){
	if(self==top){
		$('.print_hide').hide();
		$('#print_content').show();
		window.print();
		window.close();
	}else{
		window.open(location.href,'Print_Window','height='+ new String(screen.availHeight-28) + ',top=0,left=0,width=' + new String(screen.availWidth-10) + ',location=no,menubar=no,scrollbars=yes,resizable=no,toolbar=no,status=no');
	}
}
$(document).ready(function(){
	if(self==top){
		$('.tophide').hide();
	}
})
</script>